package scu.maqiang.matlabcases;

import scu.maqiang.fes.BVPType;
import scu.maqiang.heat.Heat2DT31;
import scu.maqiang.mesh.Mesh2T3;
import scu.maqiang.mesh.MeshFormat;

public class HeatTransferOnBlockWithCavity {

	public static void main(String[] args) {
		String fileName = "matlabMeshes\\BlockWithCavity.msh";
		Mesh2T3 mesh2D = new Mesh2T3().readMesh(fileName, MeshFormat.msh);
		Heat2DT31 heat = new Heat2DT31(mesh2D);
		double theta = 0.5, T = 5, dt = 0.05;
		double[] x0 = new double[mesh2D.getNv()];
		heat.GeneralHeatProblem(new BVPType[] {BVPType.COMMON, BVPType.CONSIST_MASS},
				1.0, 1.0, 0.0, 
				new double[] {theta, T, dt}, 
				new int[] {6}, 20.0, 
				new int[] {1}, -10, 
				null, 0.0, 0.0, 
				x0, 
				"matlabResults\\HeatTransferOnBlockWithCavity.dat");
	
	}

}
